/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package co.com.smart.hawk.controller.impl;

import co.com.smart.hawk.controller.HawkInventarioInicialCtrl;
import co.com.smart.hawk.dto.ArticulosDTO;
import co.com.smart.hawk.dto.DatosMaestrosDTO;
import co.com.smart.hawk.dto.InventarioInicialDTO;
import co.com.smart.hawk.model.caller.InventarioInicialcaller;
import co.com.smart.hawk.model.caller.MaestrosCaller;
import co.com.smart.hawk.utilities.Utility.CallBackSmartHawk;
import java.util.List;
import javax.persistence.EntityManager;

/**
 *
 * @author Ceyni Paola
 */
public class HawkInventarioInicialCtrlImpl implements HawkInventarioInicialCtrl {

    private EntityManager entityManager;
    private MaestrosCaller caller;
    private InventarioInicialcaller callerInventarioInicial;

     public HawkInventarioInicialCtrlImpl() {
        this(null);
    }

    
    public HawkInventarioInicialCtrlImpl(EntityManager entityManager) {
        this.entityManager = entityManager;
        caller = new MaestrosCaller();
        callerInventarioInicial = new InventarioInicialcaller(); 
}

    @Override
    public void cargarDatosMaestros(CallBackSmartHawk<List<DatosMaestrosDTO>> callBack, DatosMaestrosDTO filtro) throws Throwable {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void grabarInventarioInicial(CallBackSmartHawk<InventarioInicialDTO> callBack, InventarioInicialDTO sendObject) throws Throwable {
         callBack.endProcess(callerInventarioInicial.grabarInventarioInicial(sendObject));
    }

    @Override
    public void listarInventarioinicial(CallBackSmartHawk<List<InventarioInicialDTO>> callBack, InventarioInicialDTO filtros) throws Throwable {
    
        callBack.endProcess(callerInventarioInicial.listarInventarioinicial(filtros));
    }
    
}